home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / !Interfaces / Universal Interfaces 2.0a1 / CIncludes / Displays.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-17  |  7.1 KB  |  204 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Displays.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a1.  ETO #15, MPW prerelease.  Sunday, July 17, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __DISPLAYS__
  18. #define __DISPLAYS__
  19.  
  20.  
  21. #ifndef __APPLEEVENTS__
  22. #include <AppleEvents.h>
  23. #endif
  24. /*    #include <Errors.h>                                            */
  25. /*        #include <ConditionalMacros.h>                            */
  26. /*    #include <Types.h>                                            */
  27. /*    #include <Memory.h>                                            */
  28. /*        #include <MixedMode.h>                                    */
  29. /*    #include <OSUtils.h>                                        */
  30. /*    #include <Events.h>                                            */
  31. /*        #include <Quickdraw.h>                                    */
  32. /*            #include <QuickdrawText.h>                            */
  33. /*    #include <EPPC.h>                                            */
  34. /*        #include <PPCToolbox.h>                                    */
  35. /*            #include <AppleTalk.h>                                */
  36. /*        #include <Processes.h>                                    */
  37. /*            #include <Files.h>                                    */
  38. /*    #include <Notification.h>                                    */
  39.  
  40. #ifndef __WINDOWS__
  41. #include <Windows.h>
  42. #endif
  43. /*    #include <Controls.h>                                        */
  44. /*        #include <Menus.h>                                        */
  45.  
  46. #ifndef __COMPONENTS__
  47. #include <Components.h>
  48. #endif
  49.  
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53.  
  54. #if GENERATINGPOWERPC
  55. #pragma options align=mac68k
  56. #endif
  57.  
  58. #ifdef __CFM68K__
  59. #pragma lib_export on
  60. #endif
  61.  
  62.  
  63. enum {
  64. /* AppleEvents Core Suite */
  65.     kAESystemConfigNotice        = 'cnfg',
  66. /* Core Suite types */
  67.     kAEDisplayNotice            = 'dspl',
  68.     keyDMConfigVersion            = '∂cvr',
  69.     keyDMConfigFlags            = '∂cfg',
  70.     keyDMConfigReserved            = '∂crs',
  71.     keyDisplayID                = '∂did',
  72.     keyDisplayComponent            = '∂dcp',
  73.     keyDisplayDevice            = '∂dev',
  74.     keyDisplayFlags                = '∂dfg',
  75.     keyDisplayMode                = '∂dm ',
  76.     keyDisplayModeReserved        = '∂dmr',
  77.     keyDisplayReserved            = '∂ddr',
  78.     keyDeviceFlags                = '∂∂fg',
  79.     keyDeviceDepthMode            = '∂∂dm',
  80.     keyDeviceRect                = '∂∂re',
  81.     keyPixMapRect                = '∂pre',
  82.     keyPixMapHResolution        = '∂phr',
  83.     keyPixMapVResolution        = '∂pvr',
  84.     keyPixMapPixelType            = '∂ppt',
  85.     keyPixMapPixelSize            = '∂pps',
  86.     keyPixMapCmpCount            = '∂pcc',
  87.     keyPixMapCmpSize            = '∂pcs',
  88.     keyPixMapAlignment            = '∂ppa',
  89.     keyPixMapResReserved        = '∂pp®',
  90.     keyPixMapReserved            = '∂ppr',
  91.     keyPixMapColorTableSeed        = '∂pct',
  92.     keyDisplayOldConfig            = 'dold',
  93.     keyDisplayNewConfig            = 'dnew'
  94. };
  95.  
  96. typedef unsigned long DisplayIDType;
  97.  
  98. /* Switch Flags */
  99.  
  100. enum {
  101. /* Flag indicating that there is no need to confirm a switch to this mode */
  102.     kNoSwitchConfirmBit            = 0
  103. };
  104.  
  105. typedef pascal void (*DMNotificationProcPtr)(AppleEvent *theEvent);
  106.  
  107. #if GENERATINGCFM
  108. typedef UniversalProcPtr DMNotificationUPP;
  109. #else
  110. typedef DMNotificationProcPtr DMNotificationUPP;
  111. #endif
  112.  
  113. enum {
  114.     uppDMNotificationProcInfo = kPascalStackBased
  115.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(AppleEvent*)))
  116. };
  117.  
  118. #if GENERATINGCFM
  119. #define NewDMNotificationProc(userRoutine)        \
  120.         (DMNotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMNotificationProcInfo, GetCurrentArchitecture())
  121. #else
  122. #define NewDMNotificationProc(userRoutine)        \
  123.         ((DMNotificationUPP) (userRoutine))
  124. #endif
  125.  
  126. #if GENERATINGCFM
  127. #define CallDMNotificationProc(userRoutine, theEvent)        \
  128.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDMNotificationProcInfo, (theEvent))
  129. #else
  130. #define CallDMNotificationProc(userRoutine, theEvent)        \
  131.         (*(userRoutine))((theEvent))
  132. #endif
  133.  
  134. extern pascal GDHandle DMGetFirstScreenDevice(Boolean activeOnly)
  135.  TWOWORDINLINE(0x7000, 0xABEB);
  136. extern pascal GDHandle DMGetNextScreenDevice(GDHandle theDevice, Boolean activeOnly)
  137.  TWOWORDINLINE(0x7001, 0xABEB);
  138. extern pascal void DMDrawDesktopRect(Rect *globalRect)
  139.  TWOWORDINLINE(0x7002, 0xABEB);
  140. extern pascal void DMDrawDesktopRegion(RgnHandle globalRgn)
  141.  TWOWORDINLINE(0x7003, 0xABEB);
  142. extern pascal OSErr DMGetGDeviceTablecloth(GDHandle displayDevice, ComponentInstance *tableclothInstance)
  143.  TWOWORDINLINE(0x7004, 0xABEB);
  144. extern pascal OSErr DMSetGDeviceTablecloth(GDHandle displayDevice, ComponentInstance tableclothInstance)
  145.  TWOWORDINLINE(0x7005, 0xABEB);
  146. extern pascal OSErr DMBeginConfigureDisplays(Handle *displayState)
  147.  TWOWORDINLINE(0x7006, 0xABEB);
  148. extern pascal OSErr DMEndConfigureDisplays(Handle displayState)
  149.  TWOWORDINLINE(0x7007, 0xABEB);
  150. extern pascal OSErr DMAddDisplay(GDHandle newDevice, short driver, unsigned long mode, unsigned long reserved, unsigned long displayID, ComponentInstance displayComponent, Handle displayState)
  151.  THREEWORDINLINE(0x303C, 0x0D08, 0xABEB);
  152. extern pascal OSErr DMMoveDisplay(GDHandle moveDevice, short x, short y, Handle displayState)
  153.  TWOWORDINLINE(0x7009, 0xABEB);
  154. extern pascal OSErr DMDisableDisplay(GDHandle disableDevice, Handle displayState)
  155.  TWOWORDINLINE(0x700A, 0xABEB);
  156. extern pascal OSErr DMEnableDisplay(GDHandle enableDevice, Handle displayState)
  157.  TWOWORDINLINE(0x700B, 0xABEB);
  158. extern pascal OSErr DMRemoveDisplay(GDHandle removeDevice, Handle displayState)
  159.  TWOWORDINLINE(0x700C, 0xABEB);
  160. extern pascal OSErr DMGetComponentAnimateTicks(ComponentInstance animationComponent, unsigned long *goodDelay, unsigned long *maxDelay)
  161.  TWOWORDINLINE(0x700D, 0xABEB);
  162. extern pascal OSErr DMSetComponentAnimateTicks(ComponentInstance animationComponent, unsigned long goodDelay, unsigned long maxDelay)
  163.  TWOWORDINLINE(0x700E, 0xABEB);
  164. extern pascal OSErr DMGetNextAnimateTime(unsigned long *nextAnimateTime)
  165.  TWOWORDINLINE(0x700F, 0xABEB);
  166. extern pascal OSErr DMSetMainDisplay(GDHandle newMainDevice, Handle displayState)
  167.  TWOWORDINLINE(0x7010, 0xABEB);
  168. extern pascal OSErr DMSetDisplayMode(GDHandle theDevice, unsigned long mode, unsigned long *depthMode, unsigned long reserved, Handle displayState)
  169.  THREEWORDINLINE(0x303C, 0x0A11, 0xABEB);
  170. extern pascal OSErr DMCheckDisplayMode(GDHandle theDevice, unsigned long mode, unsigned long depthMode, unsigned long *switchFlags, unsigned long reserved, Boolean *modeOk)
  171.  THREEWORDINLINE(0x303C, 0x0C12, 0xABEB);
  172. extern pascal OSErr DMGetDeskRegion(RgnHandle *desktopRegion)
  173.  THREEWORDINLINE(0x303C, 0x0213, 0xABEB);
  174. extern pascal OSErr DMRegisterNotifyProc(DMNotificationUPP notificationProc, ProcessSerialNumberPtr whichPSN)
  175.  THREEWORDINLINE(0x303C, 0x0414, 0xABEB);
  176. extern pascal OSErr DMRemoveNotifyProc(DMNotificationUPP notificationProc, ProcessSerialNumberPtr whichPSN)
  177.  THREEWORDINLINE(0x303C, 0x0415, 0xABEB);
  178. extern pascal OSErr DMGetDisplayComponent(GDHandle theDevice, ComponentInstance *displayComponent)
  179.  THREEWORDINLINE(0x303C, 0x0416, 0xABEB);
  180. extern pascal OSErr DMSetDisplayComponent(GDHandle theDevice, ComponentInstance displayComponent)
  181.  THREEWORDINLINE(0x303C, 0x0417, 0xABEB);
  182. extern pascal OSErr DMGetDisplayID(GDHandle theDevice, unsigned long *displayID)
  183.  THREEWORDINLINE(0x303C, 0x0418, 0xABEB);
  184. extern pascal OSErr DMSetDisplayID(GDHandle theDevice, unsigned long displayID)
  185.  THREEWORDINLINE(0x303C, 0x0419, 0xABEB);
  186. extern pascal OSErr DMGetDisplayDevice(unsigned long displayID, GDHandle *displayDevice)
  187.  THREEWORDINLINE(0x303C, 0x0420, 0xABEB);
  188. extern pascal OSErr DMResolveDisplayComponents(void)
  189.  THREEWORDINLINE(0x303C, 0x0021, 0xABEB);
  190.  
  191. #ifdef __CFM68K__
  192. #pragma lib_export off
  193. #endif
  194.  
  195. #if GENERATINGPOWERPC
  196. #pragma options align=reset
  197. #endif
  198.  
  199. #ifdef __cplusplus
  200. }
  201. #endif
  202.  
  203. #endif /* __DISPLAYS__ */
  204.